﻿using System;
using System.IO;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Reflection;
using System.Threading;

namespace WebServer
{
	/// <summary>
	/// WebServer Configuration
	/// </summary>
	public partial class Config
	{
		/// <summary>
		/// The Name of the WebServer System
		/// </summary>
		public const string SystemName = "WebServer";

		/// <summary>
		/// Enables or Disables the WebServer System
		/// </summary>
		public static bool Enabled = true;

		/// <summary>
		/// Enables or Disables Stand-Alone mode. This effects how the system behaves when encountering fatal exceptions.
		/// </summary>
		public static bool StandAloneMode = true;

		/// <summary>
		/// Enables or Disables Console output from the WebServer System
		/// </summary>
		public static bool ConsoleMessages = true;

		/// <summary>
		/// Enables or Disables Error Logging in the WebServer System
		/// </summary>
		public static bool ErrorLogging = true;

		/// <summary>
		/// The maximum total simultanious Client Connections allowed to connect to the WebServer at any one time
		/// </summary>
		public static int MaxConnections = 100;

		/// <summary>
		/// The delay between cleanup operations on 'AFK' Client Connections and other cahced variables
		/// </summary>
		public static TimeSpan CleanupInterval = TimeSpan.FromSeconds(10.0);

		/// <summary>
		/// The amount of time Client connections are stored in the cache before they are marked as 'AFK'
		/// </summary>
		public static TimeSpan AFKLimit = TimeSpan.FromMinutes(5.0);

		/// <summary>
		/// The amount of time between requests that must pass by before the request is marked as 'spam'
		/// </summary>
		public static TimeSpan ClientFloodThreshold = TimeSpan.FromSeconds(5.0);

		/// <summary>
		/// The Default URL, used for constructing the WebObjects Registry, this can be any valid fully qualified or well-formed URL
		/// </summary>			
		public static string DefaultURL = "http://localhost/index.vor";
	}
}
